package com.hd.appcommon.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hd.appcommon.entity.SchoolClass;
import com.hd.appcommon.entity.vo.SchoolClassVo;
import com.hd.hdxgddcommon.page.MyPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface SchoolClassMapper extends BaseMapper<SchoolClass> {
    @Select("select sc.*,c.name as collegeName" +
            " from school_class sc,college c " +
            "where sc.college_id=c.code ${ew.customSqlSegment}")
    IPage<SchoolClassVo> listClassByPage(MyPage page,@Param("ew") QueryWrapper<SchoolClass> queryWrapper);
}
